
<?php 
	
	$form=$this->beginWidget('DwzActiveForm', array(
	'id'=>'article-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array(
		'class'=>'pageForm required-validate',
		'onsubmit'=>'return iframeCallback(this,dialogAjaxDone)',
		'enctype'=>'multipart/form-data',
	),
)); ?>

<script type="text/javascript">
/*<![CDATA[*/
	function article_form(form){
		<?php echo $_REQUEST['target']=='navTab'? 'navTab': '$.pdialog';?>.reload(form.action, $(form).serializeArray());
		return false;
	}
/*]]>*/
</script>
<style>.alert .alertInner .msg{max-height:600px;overflow:visible;}</style>


	<div class="form pageFormContent" layoutH="55">
		<?php echo CHtml::errorSummary($model); ?>
		
		<div class="row">
			<?php echo $form->labelEx($model,'cate_id'); ?>
			<?php echo $form->dropDownList($model,'cate_id',Tree::items("article")); ?>
			<?php echo $form->error($model,'cate_id'); ?>
		</div>
		
		<div class="row">
			<?php echo $form->labelEx($model,'title'); ?>
			<?php echo $form->textField($model,'title',array('size'=>44,'maxlength'=>255)); ?>
			<?php echo $form->error($model,'title'); ?>
		</div>
		<div class="row">
			<?php echo $form->labelEx($model,'tags'); ?>
			<?php echo $form->textField($model,'tags',array('size'=>44,'maxlength'=>255)); ?>
			<?php echo $form->error($model,'tags'); ?>
		</div>
		<div class="row">
			<?php echo $form->labelEx($model,'datetime'); ?>
			<?php echo $form->textField($model,'datetime',array('class'=>'date')); ?>
			<?php echo $form->error($model,'datetime'); ?>
		</div>

		<div class="row">
			<div class="fcheckbox">
				
				<?php echo $form->labelEx($model,'top'); ?>
				<?php echo $form->checkBox($model,'top',array('class'=>'vmiddle')); ?>
				<?php echo $form->error($model,'top'); ?>

				<?php echo $form->labelEx($model,'digest'); ?>
				<?php echo $form->checkBox($model,'digest',array('class'=>'vmiddle')); ?>
				<?php echo $form->error($model,'digest'); ?>

				<?php echo $form->labelEx($model,'status'); ?>
				<?php echo $form->checkBox($model,'status',array('class'=>'vmiddle')); ?>
				<?php echo $form->error($model,'status'); ?>

				<?php echo $form->labelEx($model,'is_delete'); ?>
				<?php echo $form->checkBox($model,'is_delete',array('class'=>'vmiddle')); ?>
				<?php echo $form->error($model,'is_delete'); ?>
			</div>
			<br/>
		</div>
		<div class="row">
				<?php echo $form->labelEx($model,'content'); ?>
		</div>			
		<div class="row">
			<?php echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50, 'ckeditor'=>true, 'ckfinder'=>true)); ?>
			<?php echo $form->error($model,'content'); ?>		
		</div>

		<div class="row">
			<?php echo $form->labelEx($model,'sort'); ?>
			<?php echo $form->textField($model,'sort'); ?>
			<?php echo $form->error($model,'sort'); ?>
		</div>

		<div class="row">
			<?php echo $form->labelEx($model,'viewcount'); ?>
			<?php echo $form->textField($model,'viewcount'); ?>
			<?php echo $form->error($model,'viewcount'); ?>
		</div>
	
			</div>
	<div class="formBar">
		<ul>
			<li><div class="buttonActive"><div class="buttonContent">
				<button type="submit"><?php echo $model->isNewRecord ? Yii::t('admin','Create') : Yii::t('admin','Update'); ?>
</button>
			</div></div></li>
			<li>
				<div class="button"><div class="buttonContent">
					<button onclick="<?php echo $_REQUEST['target']=='navTab'? 'navTab.closeCurrentTab()': '$.pdialog.closeCurrent()';?>" type="Button"><?php echo Yii::t('admin','Cancel'); ?>
</button>
				</div></div>
			</li>
		</ul>
	</div>
<?php $this->endWidget(); ?>
